import java.io.*;
import java.math.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T = in.nextInt();
		for (int ti = 1; ti <= T; ti++) {
			System.out.print("Case #");
			System.out.print(ti);
			System.out.println(":");

			int n = in.nextInt();
			LinkedList<BigDecimal> ll = new LinkedList<BigDecimal>();
			ll.add(BigDecimal.valueOf(0)); ll.add(BigDecimal.valueOf(1));

			for (int i = 0; i < n; i++) {
				int tmp = in.nextInt();
				ListIterator<BigDecimal> iter = ll.listIterator(tmp);
				BigDecimal a = iter.next(), b = iter.next();
				BigDecimal ans = a.add(b).divide(BigDecimal.valueOf(2));
				iter.previous();
				iter.add(ans);

				System.out.println(ans);
			}
		}
	}
}
